import React, { Component } from 'react'
import Item from '../Item'


export default class List extends Component {

  render() {
    const { list, checkedList, onCheck, onDelete } = this.props;
    return (
      <div>
        {
          list.map(item => {
            return <Item key={item.id}
              id={item.id}
              checked={checkedList.includes(item.id)}
              content={item.content}
              onCheck={onCheck}
              onDelete={onDelete} />
          })
        }
        
      </div>
    )
  }
}
